package org.xt.module.api;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Filters;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.POST;
@IocBean
@At("/api/util")
public class UtilApiModule {
	
	@At("/getTime")
	@POST
	@Ok("json")
	@Filters
	public String getTime(){
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return sf.format(new Date());
	}
}
